''' Mission 9 - Game Spinner ''' from codex import * import random from time import sleep def show_random_arrow(): arrow = random.randrange(8) display.show(pics.ALL_ARROWS[arrow]) def spin_animation(count): index = 0 loops = 0 delay = 0.05 while loops < count: loops = loops + 1 display.show(pics.ALL_ARROWS[index]) sleep(delay) delay = delay + 0.005 index = index + 1 if index == 8: index = 0 while True: if buttons.is_pressed(BTN_A) or buttons.is_pressed(BTN_B): spin_animation(30) show_random_arrow()